package com.homework8_3;

import hfjava.Student;

public class Test {
    public static void main(String[] args) {
        Students studends1=new Students("张三",21,"123456",90);
        Students studends2=new Students("张四",21,"123457",91);
            studends1.compareTo(studends2);
            System.out.println("张三成绩比张四成绩"+(studends1.compareTo(studends2)>0?"大":(studends1.compareTo(studends2)<0)?"小":"相等"));

            News news1=new News(123456,"狗狗","拉布拉多贪吃",100);
            News news2=new News(123456,"猫咪","加菲猫容易得高血压",90);
            news1.compareTo(news2);
        System.out.println("狗比猫的点记率"+(news1.compareTo(news2)>0?"多":(news1.compareTo(news2)<0)?"少":"一样"));

    }
}
